<?php

namespace App\Http\Requests\UserApi\ClassController;

use App\Http\Requests\BaseRequest;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class ClassHomeInfo extends BaseRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        $rules=[
            'class_id'=>'required|exists:class_base,id',
        ];

        return $rules;
    }

    public function messages()
    {
        return [
            'class_id.required' => 'class_id参数必传!',
            'class_id.exists' => 'class_id参数有误!',
        ];
    }
}
